/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.rbh.risk.entity;

import java.io.Serializable;
import java.util.Date;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author IT-Mafia
 */
@Entity
@XmlRootElement
@Table(name = "opduser")
public class Opduser implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "loginname", length = 250, nullable = false)
    private String loginname;
    @Column(name = "name", length = 250)
    private String name;
    @Column(name = "password", length = 250)
    private String password;
    @Column(name = "passweb", length = 250)
    private String passweb;
    @Lob
    @Column(name = "accessright", length = 65535)
    private String accessright;
    @Column(name = "department", length = 250)
    private String department;
    @Column(name = "departmentposition", length = 250)
    private String departmentposition;
    @Column(name = "entryposition", length = 250)
    private String entryposition;
    @Lob
    @Column(name = "picture")
    private byte[] picture;
    @Column(name = "startfullscreen")
    private Character startfullscreen;
    @Column(name = "doctorcode", length = 7)
    private String doctorcode;
    @Column(name = "drug_access_level")
    private Short drugAccessLevel;
    @Column(name = "groupname", length = 250)
    private String groupname;
    @Lob
    @Column(name = "visible_menu", length = 65535)
    private String visibleMenu;
    @Column(name = "viewallmenu")
    private Character viewallmenu;
    @Column(name = "lab_staff")
    private Character labStaff;
    @Column(name = "hospital_department_id")
    private Integer hospitalDepartmentId;
    @Column(name = "nhso_user", length = 250)
    private String nhsoUser;
    @Column(name = "nhso_password", length = 250)
    private String nhsoPassword;
    @Column(name = "max_station")
    private Integer maxStation;
    @Column(name = "show_tip")
    private Character showTip;
    @Column(name = "password_expire_date")
    @Temporal(TemporalType.DATE)
    private Date passwordExpireDate;
    @Column(name = "password_recheck_date")
    private Integer passwordRecheckDate;
    @Column(name = "new_password_date")
    @Temporal(TemporalType.DATE)
    private Date newPasswordDate;
    @Column(name = "check_lab_password")
    private Character checkLabPassword;
    @Column(name = "pcu_user")
    private Character pcuUser;
    @Column(name = "account_disable")
    private Character accountDisable;
    @Column(name = "restrict_ward_access")
    private Character restrictWardAccess;
    @Column(name = "real_staff")
    private Character realStaff;
    @Column(name = "restrict_clinic_access")
    private Character restrictClinicAccess;
    @Column(name = "no_lab_result_display")
    private Character noLabResultDisplay;
    @Column(name = "no_doctor_consult_display")
    private Character noDoctorConsultDisplay;
    @Column(name = "no_announce_display")
    private Character noAnnounceDisplay;
    @Column(name = "announce_read_count")
    private Integer announceReadCount;
    @Column(name = "xray_staff")
    private Character xrayStaff;
    @Column(name = "hos_guid", length = 38)
    private String hosGuid;
    @Column(name = "lab_check_password")
    private Character labCheckPassword;
    @Column(name = "cid", length = 13)
    private String cid;
    @Column(name = "hos_guid_ext", length = 64)
    private String hosGuidExt;
    @OneToMany(mappedBy = "opduser", fetch = FetchType.LAZY)
    private List<Profile> profileList;

    public Opduser() {
    }

    public Opduser(String loginname) {
        this.loginname = loginname;
    }

    public String getLoginname() {
        return loginname;
    }

    public void setLoginname(String loginname) {
        this.loginname = loginname;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getPassweb() {
        return passweb;
    }

    public void setPassweb(String passweb) {
        this.passweb = passweb;
    }

    public String getAccessright() {
        return accessright;
    }

    public void setAccessright(String accessright) {
        this.accessright = accessright;
    }

    public String getDepartment() {
        return department;
    }

    public void setDepartment(String department) {
        this.department = department;
    }

    public String getDepartmentposition() {
        return departmentposition;
    }

    public void setDepartmentposition(String departmentposition) {
        this.departmentposition = departmentposition;
    }

    public String getEntryposition() {
        return entryposition;
    }

    public void setEntryposition(String entryposition) {
        this.entryposition = entryposition;
    }

    public byte[] getPicture() {
        return picture;
    }

    public void setPicture(byte[] picture) {
        this.picture = picture;
    }

    public Character getStartfullscreen() {
        return startfullscreen;
    }

    public void setStartfullscreen(Character startfullscreen) {
        this.startfullscreen = startfullscreen;
    }

    public String getDoctorcode() {
        return doctorcode;
    }

    public void setDoctorcode(String doctorcode) {
        this.doctorcode = doctorcode;
    }

    public Short getDrugAccessLevel() {
        return drugAccessLevel;
    }

    public void setDrugAccessLevel(Short drugAccessLevel) {
        this.drugAccessLevel = drugAccessLevel;
    }

    public String getGroupname() {
        return groupname;
    }

    public void setGroupname(String groupname) {
        this.groupname = groupname;
    }

    public String getVisibleMenu() {
        return visibleMenu;
    }

    public void setVisibleMenu(String visibleMenu) {
        this.visibleMenu = visibleMenu;
    }

    public Character getViewallmenu() {
        return viewallmenu;
    }

    public void setViewallmenu(Character viewallmenu) {
        this.viewallmenu = viewallmenu;
    }

    public Character getLabStaff() {
        return labStaff;
    }

    public void setLabStaff(Character labStaff) {
        this.labStaff = labStaff;
    }

    public Integer getHospitalDepartmentId() {
        return hospitalDepartmentId;
    }

    public void setHospitalDepartmentId(Integer hospitalDepartmentId) {
        this.hospitalDepartmentId = hospitalDepartmentId;
    }

    public String getNhsoUser() {
        return nhsoUser;
    }

    public void setNhsoUser(String nhsoUser) {
        this.nhsoUser = nhsoUser;
    }

    public String getNhsoPassword() {
        return nhsoPassword;
    }

    public void setNhsoPassword(String nhsoPassword) {
        this.nhsoPassword = nhsoPassword;
    }

    public Integer getMaxStation() {
        return maxStation;
    }

    public void setMaxStation(Integer maxStation) {
        this.maxStation = maxStation;
    }

    public Character getShowTip() {
        return showTip;
    }

    public void setShowTip(Character showTip) {
        this.showTip = showTip;
    }

    public Date getPasswordExpireDate() {
        return passwordExpireDate;
    }

    public void setPasswordExpireDate(Date passwordExpireDate) {
        this.passwordExpireDate = passwordExpireDate;
    }

    public Integer getPasswordRecheckDate() {
        return passwordRecheckDate;
    }

    public void setPasswordRecheckDate(Integer passwordRecheckDate) {
        this.passwordRecheckDate = passwordRecheckDate;
    }

    public Date getNewPasswordDate() {
        return newPasswordDate;
    }

    public void setNewPasswordDate(Date newPasswordDate) {
        this.newPasswordDate = newPasswordDate;
    }

    public Character getCheckLabPassword() {
        return checkLabPassword;
    }

    public void setCheckLabPassword(Character checkLabPassword) {
        this.checkLabPassword = checkLabPassword;
    }

    public Character getPcuUser() {
        return pcuUser;
    }

    public void setPcuUser(Character pcuUser) {
        this.pcuUser = pcuUser;
    }

    public Character getAccountDisable() {
        return accountDisable;
    }

    public void setAccountDisable(Character accountDisable) {
        this.accountDisable = accountDisable;
    }

    public Character getRestrictWardAccess() {
        return restrictWardAccess;
    }

    public void setRestrictWardAccess(Character restrictWardAccess) {
        this.restrictWardAccess = restrictWardAccess;
    }

    public Character getRealStaff() {
        return realStaff;
    }

    public void setRealStaff(Character realStaff) {
        this.realStaff = realStaff;
    }

    public Character getRestrictClinicAccess() {
        return restrictClinicAccess;
    }

    public void setRestrictClinicAccess(Character restrictClinicAccess) {
        this.restrictClinicAccess = restrictClinicAccess;
    }

    public Character getNoLabResultDisplay() {
        return noLabResultDisplay;
    }

    public void setNoLabResultDisplay(Character noLabResultDisplay) {
        this.noLabResultDisplay = noLabResultDisplay;
    }

    public Character getNoDoctorConsultDisplay() {
        return noDoctorConsultDisplay;
    }

    public void setNoDoctorConsultDisplay(Character noDoctorConsultDisplay) {
        this.noDoctorConsultDisplay = noDoctorConsultDisplay;
    }

    public Character getNoAnnounceDisplay() {
        return noAnnounceDisplay;
    }

    public void setNoAnnounceDisplay(Character noAnnounceDisplay) {
        this.noAnnounceDisplay = noAnnounceDisplay;
    }

    public Integer getAnnounceReadCount() {
        return announceReadCount;
    }

    public void setAnnounceReadCount(Integer announceReadCount) {
        this.announceReadCount = announceReadCount;
    }

    public Character getXrayStaff() {
        return xrayStaff;
    }

    public void setXrayStaff(Character xrayStaff) {
        this.xrayStaff = xrayStaff;
    }

    public String getHosGuid() {
        return hosGuid;
    }

    public void setHosGuid(String hosGuid) {
        this.hosGuid = hosGuid;
    }

    public Character getLabCheckPassword() {
        return labCheckPassword;
    }

    public void setLabCheckPassword(Character labCheckPassword) {
        this.labCheckPassword = labCheckPassword;
    }

    public String getCid() {
        return cid;
    }

    public void setCid(String cid) {
        this.cid = cid;
    }

    public String getHosGuidExt() {
        return hosGuidExt;
    }

    public void setHosGuidExt(String hosGuidExt) {
        this.hosGuidExt = hosGuidExt;
    }

    public List<Profile> getProfileList() {
        return profileList;
    }

    public void setProfileList(List<Profile> profileList) {
        this.profileList = profileList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (loginname != null ? loginname.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Opduser)) {
            return false;
        }
        Opduser other = (Opduser) object;
        if ((this.loginname == null && other.loginname != null) || (this.loginname != null && !this.loginname.equals(other.loginname))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.rbh.risk.entity.Opduser[ loginname=" + loginname + " ]";
    }
}
